package com.md.network.api

import android.os.Parcelable
import kotlinx.android.parcel.Parcelize


//首页写死数据，后续网络请求
data class LocalCategory(val localRes: Int,
                         val lName: String,
                         val lid: Int,
                         val llogo: String) : Category("","",ArrayList(),"", llogo,lName)

open class Category(
        val author: String,
        val desc: String,
        val groups: List<Group>,
        val id: String,
        val logoUrl: String,
        val name: String,
        var isSel:Boolean=false
)

data class Group(
        val albums: List<Album>,
        val name: String
)

@Parcelize
data class Album(
        var audios: ArrayList<Audio>,
        var author: String?,
        var coverUrl: String?,
        var desc: String?,
        var id: String,
        var count: Int,
        var name: String,
        var todayAudio:Audio?
) : Parcelable


@Parcelize
data class Audio(
        var id: String,
        var author: String?,
        var coverUrl: String?,
        var desc: String?,
        var encrypt: Boolean,
        var name: String?,
        var audioUrl: String?

) : Parcelable {
    var albumId:String=""
    var albumName:String=""
    var albumAuthor:String=""
    var albumDes:String?=""
    var downloadStatus:Int?=0
}

@Parcelize
data class SearchedAudio(
        var id: String,
        var name: String,
        var desc: String,
        var author: String,
        var encrypt: Boolean,
        var audioUrl:String,
        var albums:ArrayList<SearchedAlbum>

):Parcelable{
    var isAddAlbum = false
    var albumName=""
}

@Parcelize
data class SearchedAlbum(
    var id: Int,
    var name: String,
    var coverUrl: String
):Parcelable

@Parcelize
data class SearchResult(
        var total:Int,
        var list:ArrayList<SearchedAudio>
):Parcelable
